package com.hospital.billcommon.module.filter;

import java.util.ArrayList;
import java.util.List;

/**
 * @description 折扣过滤链工厂类
 * @author: liuwei
 * @create 2020/5/14 10:27 上午
 **/
public class CutOffFactory {

    public static List<CutOff> getCutOffList(String packagePath){
        List<CutOff> cutOffList=new ArrayList<>();
        cutOffList.add(new ExcludeCutOff());
        cutOffList.add(new CommonCutOff());
//        Reflections reflections=new Reflections(packagePath);
//        Set<Class<?>> typesAnnotatedWith = reflections.getTypesAnnotatedWith(CutOffFilter.class);
//        for (Class filter:typesAnnotatedWith){
//            try{
//                cutOffList.add((CutOff) filter.getDeclaredConstructor().newInstance());
//            }catch (Exception ex){
//
//            }
//        }
        return cutOffList;
    }
}
